<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>入门</title>
	<script src="./vue.js"></script>
</head>
<body>
	<div id="root">
		<div v-on:click="handleClick">{{msg}}</div>
		<div @click="handleClick">{{msg}}</div>
		<h1>{{number}},{{data.number}}</h1>
		<h2 v-text="number"></h2>
		<h2 v-html="data.number"></h2>
		<div v-text="content"></div>
		<div v-html="content"></div>
	</div>
	<div id="root2">
	
	</div>
	
	<script>
		new Vue({
			el:"#root2",
			template: '<h1>模板 hello {{msg}}<h2>',
			data:{
				msg:'world'
			}
		})
	
		new Vue({
			el:"#root",
			data:{
				msg: "hello world",
				number: 777777,
				data : {
					number : "666666"
				},
				content:"<h1>hello</h1>"
			},
			methods:{
				handleClick: function(){
					alert(123)
					this.msg = "hello world 2"
				}
			}
		})
	</script>
</body>
</html>